package com.adminpanel.action;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.SessionAttributes;
import org.springframework.web.servlet.ModelAndView;

import com.adminpanel.util.Util;


@Controller
@SessionAttributes("loginuser")
public class RssController {
	@RequestMapping("myrss")
	public String getRssInfo() {
		return "myrss";
	}
	
	
	@RequestMapping(value="/getRssinfo",method = RequestMethod.GET)
	//@ResponseBody
	public ModelAndView geturl(@RequestParam("ra") String longUrl){
		
		ModelAndView mav = new ModelAndView("showxml");
		String urlbean = new Util().getRss(longUrl);
		//mav.addAttribute("urlbean", urlbean);
		mav.addObject("urlbean", urlbean);
		return mav;
		
	}
}
